import { ColumnGroupType, ColumnType } from "antd/es/table"
export const virtualRecordsetupColumns = (
	newFormat: (p: { id: string } | string) => string,
	_getFromDic: (arg: string, strictlyLabel?: boolean) => any
): Record<string, ColumnGroupType<any> | ColumnType<any>> => ({
	virtualRecord_parentProxyName: {
		key: "parentProxyName",
		dataIndex: "parentProxyName",
		title: newFormat("common.top_agent"),
		align: "center",
		width: 120
	},
	virtualRecord_merchantId: {
		key: "merchantId",
		dataIndex: "merchantId",
		title: newFormat("funds.member.merchantName"),
		align: "center",
		width: 120
	},
	virtualRecord_virtualAddress: {
		key: "virtualAddress",
		dataIndex: "virtualAddress",
		title: newFormat("member.vitual.virtual_currency_account_address"),
		align: "center",
		width: 120
	},
	virtualRecord_virtualKind: {
		key: "virtualKind",
		dataIndex: "virtualKind",
		title: newFormat("common.components.virtual_type"),
		align: "center",
		width: 120
	},
	virtualRecord_virtualProtocol: {
		key: "virtualProtocol",
		dataIndex: "virtualProtocol",
		title: newFormat("member.virtual_currency_account_information.virtual_currency_protocol"),
		align: "center",
		width: 120
	},
	virtualRecord_windControlName: {
		key: "windControlName",
		dataIndex: "windControlName",
		title: newFormat("agent.button_permissions.riskControlLevel"),
		align: "center",
		width: 120,
		render: (_text: any, record: any) => <div>{record.windControlName ?? "-"}</div>
	},
	virtualRecord_operateType: {
		key: "operateType",
		dataIndex: "operateType",
		title: newFormat("common.operation_type"),
		align: "center",
		width: 120,
		render: _getFromDic("operateTypeArr", false)
	},
	virtualRecord_remark: {
		key: "remark",
		dataIndex: "remark",
		title: newFormat("common.components.remark"),
		align: "center",
		width: 120
	},
	virtualRecord_operator: {
		key: "operator",
		dataIndex: "operator",
		title: newFormat("common.updateBy"),
		align: "center",
		width: 120
	},
	virtualRecord_createDt: {
		key: "createDt",
		dataIndex: "createDt",
		title: newFormat("common.updateAt"),
		align: "center",
		width: 120
	},
	virtualRecord_windControlLevelName: {
		key: "windControlLevelName",
		dataIndex: "windControlLevelName",
		title: newFormat("common.operation_type"),
		align: "center",
		width: 120
	},
	virtualRecord_userNameType: {
		key: "userName",
		dataIndex: "userName",
		title: newFormat("common.member_number"),
		align: "center",
		width: 120
	}
})
